package com.pixiv.service.Impl;


import com.pixiv.DAO.CoverShowMapping;
import com.pixiv.service.CoverShowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CoverShowServiceImpl implements CoverShowService {

    @Autowired
    private CoverShowMapping coverShowMapping;

    public String getCover(int id)
    {
        return coverShowMapping.getCover(id);
    }

    public int getXPos(int id)
    {
        return coverShowMapping.getOffsetX(id);
    }
    public int getYPos(int id)
    {
        return coverShowMapping.getOffsetY(id);
    }

    @Override
    public boolean isExistUser(int id) {
        int count = coverShowMapping.isExistUser(id);
        if (count > 0)
            return true;
        return false;
    }
}
